﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Key = global::Avalonia.Input.Key;
namespace TTEngine.Impl.Avalonia
{
    public static class KeyCodeConverter
    {
        public static KeyCode Conv(Key key)
        {
            switch(key)
            {
                case Key.Escape:
                    return KeyCode.Escape;
                case Key.D0:
                    return KeyCode.D0;
                case Key.D1: 
                    return KeyCode.D1;
                case Key.D2:
                    return KeyCode.D2;
                case Key.D3:
                    return KeyCode.D3;
                case Key.D4:
                    return KeyCode.D4;
                case Key.D5:
                    return KeyCode.D5;
                case Key.D6:
                    return KeyCode.D6;
                case Key.D7:
                    return KeyCode.D7;
                case Key.D8:
                    return KeyCode.D8;
                case Key.D9:
                    return KeyCode.D9;
                case Key.A:
                    return KeyCode.A;
                case Key.B:
                    return KeyCode.B;
                case Key.C:
                    return KeyCode.C;
                case Key.D:
                    return KeyCode.D;
                case Key.E:
                    return KeyCode.E;
                case Key.F:
                    return KeyCode.F;
                case Key.G:
                    return KeyCode.G;
                case Key.H:
                    return KeyCode.H;
                case Key.I:
                    return KeyCode.I;
                case Key.J:
                    return KeyCode.J;
                case Key.K:
                    return KeyCode.K;
                case Key.L:
                    return KeyCode.L;
                case Key.M:
                    return KeyCode.M;
                case Key.N:
                    return KeyCode.N;
                case Key.O:
                    return KeyCode.O;
                case Key.P:
                    return KeyCode.P;
                case Key.Q:
                    return KeyCode.Q;
                case Key.R:
                    return KeyCode.R;
                case Key.S:
                    return KeyCode.S;
                case Key.T:
                    return KeyCode.T;
                case Key.U:
                    return KeyCode.U;
                case Key.V:
                    return KeyCode.V;
                case Key.W:
                    return KeyCode.W;
                case Key.X:
                    return KeyCode.X;
                case Key.Y:
                    return KeyCode.Y;
                case Key.Z:
                    return KeyCode.Z;
                case Key.LeftShift:
                    return KeyCode.LeftShift;
                case Key.RightShift:
                    return KeyCode.RightShift;
                case Key.LeftCtrl:
                    return KeyCode.LeftControl;
                case Key.RightCtrl:
                    return KeyCode.RightControl;
                case Key.LeftAlt:
                    return KeyCode.LeftAlt;
                case Key.RightAlt:
                    return KeyCode.RightAlt;
                case Key.Space:
                    return KeyCode.Space;
                case Key.Enter:
                    return KeyCode.Enter;
                case Key.Back:
                    return KeyCode.Backspace;
                case Key.Tab:
                    return KeyCode.Tab;
                case Key.Up:
                    return KeyCode.Up;
                case Key.Down:
                    return KeyCode.Down;
                case Key.Left:
                    return KeyCode.Left;
                case Key.Right:
                    return KeyCode.Right;
                case Key.Insert:
                    return KeyCode.Insert;
                case Key.Delete:
                    return KeyCode.Delete;
                case Key.Home:
                    return KeyCode.Home;
                case Key.End:
                    return KeyCode.End;
                case Key.PageUp:
                    return KeyCode.PageUp;
                case Key.PageDown:
                    return KeyCode.PageDown;
                case Key.F1:
                    return KeyCode.F1;
                case Key.F2:
                    return KeyCode.F2;
                case Key.F3:
                    return KeyCode.F3;
                case Key.F4:
                    return KeyCode.F4;
                case Key.F5:
                    return KeyCode.F5;
                case Key.F6:
                    return KeyCode.F6;
                case Key.F7:
                    return KeyCode.F7;
                case Key.F8:
                    return KeyCode.F8;
                case Key.F9:
                    return KeyCode.F9;
                case Key.F10:
                    return KeyCode.F10;
                case Key.F11:
                    return KeyCode.F11;
                case Key.F12:
                    return KeyCode.F12;
                default:
                    return KeyCode.Unknown;
            }
        }
    }
}
